<!DOCTYPE HTML>
<html>
<head>
	<meta charset="utf-8" />
	<meta name="wap-font-scale" content="no">
	<meta name="apple-mobile-web-app-capable" content="yes" />
	<meta name="apple-mobile-web-app-status-bar-style" content="black" />
	<meta name="format-detection" content="telephone=no" />
	<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
	<title>e校园详情</title>
	<meta name="keywords" content="e校园">
	<meta name="description" content="e校园">
	<link href="css/content.min.css" rel="stylesheet" type="text/css">
	<link href="css/style.css" rel="stylesheet" type="text/css">
	<style>
		body{ 
			min-width:320px; 
			max-width:1180px; 
			margin:0 auto; 
			font-family:"microsoft yahei",sans-serif;
			line-height:1.6;
			color:#333; 
			background: rgba(255, 255, 255, 0);
		}
		*{background: rgba(255, 255, 255, 0.1); margin: 0; padding: 0;}
		/* 详情页 */
		.mainCon{
			/* padding: .3rem 0.2rem 0; */
			padding: .2rem 1.7rem 0 .1rem;
		}
		.mainCon .header{
			margin-bottom: .2rem;
			font-size: 0;
		}
		.mainCon .header .art-title{
			font-size: .24rem;
			color:#333;
			margin: 0;
			font-weight: 500;
			position: relative;
			word-break:break-all; /* 支持IE和chrome，FF不支持*/
			word-wrap:break-word; /* 以上三个浏览器均支持 */
		}
		.mainCon .header .art-title span{
			position: absolute;
			right: -1.6rem;
			bottom: 0;
			font-size: .2rem;
			color: #999;
		}			
		.mainCon .header .artblock{
			display: inline-block;
			padding: 0 .16rem;
			font-size: .2rem;
			line-height: .4rem;
			color:#999;
			background: #75ACE1;
			color: #fff;
			border-radius: 6px;
			margin-top: .15rem;
		}
		.strab-con{
			width: 100%;
		}
		.strab-con p{			
			font-size: .2rem;
			line-height: 1.6;
			color: #666;
			max-width: 100%;
			word-break:break-all; /* 支持IE和chrome，FF不支持*/
			word-wrap:break-word; /* 以上三个浏览器均支持 */
		}
		.strab-con img{
			display: block;
			margin:.1rem 0;
			max-width: 100%;
		}
	</style>
</head>

<body>
	<div class="mainCon" id="artCon"></div>
	<div id="null-box"></div>
</body>
<script src="script/jquery.min.js"></script>
<script src="script/jquery.lazyload.js"></script>
<script src="script/crypto-js.js"></script>
<script src="script/md5.js" type="text/javascript"></script> 
<script src="script/common.js"></script>
<script src="script/myAjax.js"></script>
<script>
	function init() {
		try {
			// console.log(12);
			window.vipObj = vipObj; // 全局下面设置vipObj 方法
		} catch (error) {
			// 
		}
	}
	
	init();
	var id = getQueryString('articleId'),
		typeName = unUnicode(getQueryString('fTypeId')) || '无类别';

	$(function () {
		getJumpInfo(id);
	});

	function getJumpInfo(id) {
		var data = {"articleId": id };		
		myAjax("post", ARI_API + "/family/ecampus/getCampusArticle", setHtml, data)
	}

	function unUnicode(str) {
		return unescape(str.replace(/\\/g, "%"));
	}

	function setHtml(data) {
		if(!data|| data == null) {
			var info=$('<p class="null-img"></p><span class="text">该文章已经被删除了...</span>');
			$('#null-box').append(info); 
			return;
		}
		var title = data.sName;
		var update = data.sCreateTime;
		var author = data.sPublisher;
		var content = data.sHtml;
		var sLink = data.sLink;
		if(content) {
			content = content.replace(/[^-]src=[\'\"]?([^\'\"]*)[\'\"]?/ig,' src="" ');
			content = unescape(content&&content.replace(/\u/g, "u"));  
			var conInfo = $('<div class="art01"><div class="header"><h2 class="art-title">' + title + '<span>' + update.substring(0,10) + '</span></h2><span class="artblock">' + typeName + '</span></div><div class="strab-con panel-body">' + content + '</div></div>');
			$('#artCon').append(conInfo);
		}
		setImageHeight();
	}
	
	$(window).on('resize',setImageHeight);

	function setImageHeight(){
		var $wscnph = $('.wscnph').add($('img[data-layer="photo"]'));
		$wscnph.each(function(){
			var parentW = $(this).parent().width();
			var orginW = $(this).data('w') || $(this).width();
			var ratio = $(this).data('ratio');
			if (orginW >= parentW) {
				var iHeight = parentW / ratio;
				$(this).width('100%');
				$(this).height(ratio ? iHeight: 'auto');
			} else {
				$(this).width(orginW);
				$(this).height(orginW/ratio);
			}
		});
		lazyImage();
	}

	function lazyImage() {
		$('img.img-loading').add('img').lazyload({ threshold :30,'data_attribute': 'mce-src'});	
	}
</script>
</html>